<template>
  <div class="addEdit-block">
    <el-table class="tables" :size="contents.tableSize" :show-header="contents.tableShowHeader"
            :header-row-style="headerRowStyle" :header-cell-style="headerCellStyle"
            :border="contents.tableBorder"
            :fit="contents.tableFit"
            :stripe="contents.tableStripe"
            :style="{width: '100%',fontSize:contents.tableContentFontSize,color:contents.tableContentFontColor}"
            :data="dataList"
            v-loading="dataListLoading"
            highlight-current-row
            @current-change="handleCurrentChange"
            @selection-change="selectionChangeHandler">
            <!-- <el-table-column  v-if="contents.tableSelection"
                type="selection"
                :header-align="contents.tableAlign"
                align="center"
                width="50">
            </el-table-column> -->
                <el-table-column label="ID" :align="contents.tableAlign"  prop="id" width="50" />
                <el-table-column  :sortable="contents.tableSortable" :align="contents.tableAlign" 
                    prop="toubiaobianhao"
                   :header-align="contents.tableAlign"
                    label="投标编号">
                    <template slot-scope="scope">
                                  {{scope.row.toubiaobianhao}}
                     </template>
                </el-table-column>
                <el-table-column  :sortable="contents.tableSortable" :align="contents.tableAlign" 
                    prop="xiangmubianhao"
                   :header-align="contents.tableAlign"
                    label="项目编号">
                    <template slot-scope="scope">
                       {{scope.row.xiangmubianhao}}
                     </template>
                </el-table-column>
                <el-table-column  :sortable="contents.tableSortable" :align="contents.tableAlign" 
                    prop="xiangmumingcheng"
                   :header-align="contents.tableAlign"
                    label="项目名称">
                    <template slot-scope="scope">
                       {{scope.row.xiangmumingcheng}}
                     </template>
                </el-table-column>
            
                <el-table-column  :sortable="contents.tableSortable" :align="contents.tableAlign" 
                    prop="zhaobiaofenlei"
                   :header-align="contents.tableAlign"
                    label="招标分类">
                    <template slot-scope="scope">
                       {{scope.row.zhaobiaofenlei}}
                     </template>
                </el-table-column>
                <el-table-column  :sortable="contents.tableSortable" :align="contents.tableAlign" 
                    prop="zhaobiaodanwei"
                   :header-align="contents.tableAlign"
                    label="招标单位">
                    <template slot-scope="scope">
                       {{scope.row.zhaobiaodanwei}}
                     </template>
                </el-table-column>
                  <!-- <el-table-column :sortable="contents.tableSortable" :align="contents.tableAlign"  prop="toubiaowenjian"
                   :header-align="contents.tableAlign"
                    label="投标文件">
                    <template slot-scope="scope">
                      <el-button type="text" size="small" @click="download($base.url+scope.row.toubiaowenjian)">下载</el-button>
                    </template>
                  </el-table-column> -->
                <el-table-column  :sortable="contents.tableSortable" :align="contents.tableAlign" 
                    prop="toubiaojiage"
                   :header-align="contents.tableAlign"
                    label="投标价格">
                    <template slot-scope="scope">
                       {{scope.row.toubiaojiage}}
                     </template>
                </el-table-column>
                <el-table-column  :sortable="contents.tableSortable" :align="contents.tableAlign" 
                    prop="toubiaoshijian"
                   :header-align="contents.tableAlign"
                    label="投标时间">
                    <template slot-scope="scope">
                       {{scope.row.toubiaoshijian}}
                     </template>
                </el-table-column>
                <el-table-column  :sortable="contents.tableSortable" :align="contents.tableAlign" 
                    prop="gongyingshangmingcheng"
                   :header-align="contents.tableAlign"
                    label="供应商名称">
                    <template slot-scope="scope">
                       {{scope.row.gongyingshangmingcheng}}
                     </template>
                </el-table-column>
                <el-table-column  :sortable="contents.tableSortable" :align="contents.tableAlign" 
                    prop="fuzeren"
                   :header-align="contents.tableAlign"
                    label="负责人">
                    <template slot-scope="scope">
                       {{scope.row.fuzeren}}
                     </template>
                </el-table-column>
                <el-table-column  :sortable="contents.tableSortable" :align="contents.tableAlign" 
                    prop="lianxidianhua"
                   :header-align="contents.tableAlign"
                    label="联系电话">
                    <template slot-scope="scope">
                       {{scope.row.lianxidianhua}}
                     </template>
                </el-table-column>
              <el-table-column :sortable="contents.tableSortable" :align="contents.tableAlign" 
                  prop="shhf"
                 :header-align="contents.tableAlign"
                  label="审核回复">
              </el-table-column>
              <el-table-column :sortable="contents.tableSortable" :align="contents.tableAlign" 
                  prop="sfsh"
                 :header-align="contents.tableAlign"
                  label="审核状态">
                  <template slot-scope="scope">
                    <span style="margin-right:10px">{{scope.row.sfsh=='是'?'通过':'未通过'}}</span>
                  </template>
              </el-table-column>
              <el-table-column :sortable="contents.tableSortable" :align="contents.tableAlign" 
                  v-if="isAuth('zaixiantoubiao','审核')"
                  prop="sfsh"
                 :header-align="contents.tableAlign"
                  label="审核">
                  <template slot-scope="scope">
                    <el-button  type="text" icon="el-icon-edit" size="small" @click="shDialog(scope.row)">审核</el-button>
                  </template>
              </el-table-column>
              <el-table-column width="300" :align="contents.tableAlign" 
              :header-align="contents.tableAlign"
               label="操作">
               <template slot-scope="scope">
               <el-button type="success" icon="el-icon-tickets" size="mini" @click="showDetail(scope.row)">{{ contents.tableBtnFont == 1?'详情':'' }}</el-button>

               </template>
           </el-table-column>
          
        </el-table>


        <el-dialog
          title="投标详情"
          :visible.sync="tbShow"
          fullscreen
          >
          <el-form
            class="detail-form-content"
            ref="tbDetail"
            :model="tbDetail"
            label-width="80px"
          >
            <el-row >
            <el-col :span="12">
              <div >
                <el-form-item class="input" v-if="tbDetail.toubiaobianhao" label="投标编号" prop="toubiaobianhao">
                    <el-input v-model="tbDetail.toubiaobianhao" 
                      placeholder="投标编号" readonly></el-input>
                </el-form-item>
              </div>
            </el-col>
            <el-col :span="12">
              <div >
                <el-form-item class="input" label="项目编号" prop="xiangmubianhao">
                    <el-input v-model="tbDetail.xiangmubianhao" 
                      placeholder="项目编号" readonly></el-input>
                </el-form-item>
              </div>
            </el-col>
            <el-col :span="12">
              <div >
                <el-form-item class="input" label="项目名称" prop="xiangmumingcheng">
                    <el-input v-model="tbDetail.xiangmumingcheng" 
                      placeholder="项目名称" readonly></el-input>
                </el-form-item>
              </div>
            </el-col>
           
            <el-col :span="12">
              <div>
                <el-form-item class="input" label="招标分类" prop="zhaobiaofenlei">
                    <el-input v-model="tbDetail.zhaobiaofenlei" 
                      placeholder="招标分类" readonly></el-input>
                </el-form-item>
              </div>
            </el-col>
            <el-col :span="12">
              <div >
                <el-form-item class="input" label="招标单位" prop="zhaobiaodanwei">
                    <el-input v-model="tbDetail.zhaobiaodanwei" 
                      placeholder="招标单位" readonly></el-input>
                </el-form-item>
              </div>
            </el-col>
            <el-col :span="12">
              <div >
                <el-form-item class="input" label="投标价格" prop="toubiaojiage">
                    <el-input v-model="tbDetail.toubiaojiage" 
                      placeholder="投标价格" readonly></el-input>
                </el-form-item>
              </div>
            </el-col>
            <el-col :span="12">
              <div >
                <el-form-item class="input" v-if="tbDetail.toubiaoshijian" label="投标时间" prop="toubiaoshijian">
                    <el-input v-model="tbDetail.toubiaoshijian" 
                      placeholder="投标时间" readonly></el-input>
                </el-form-item>
              </div>
            </el-col>
            <el-col :span="12">
              <div >
                <el-form-item class="input" label="供应商名称" prop="gongyingshangmingcheng">
                    <el-input v-model="tbDetail.gongyingshangmingcheng" 
                      placeholder="供应商名称" readonly></el-input>
                </el-form-item>
              </div>
            </el-col>
            <el-col :span="12">
              <div >
                <el-form-item class="input" label="负责人" prop="fuzeren">
                    <el-input v-model="tbDetail.fuzeren" 
                      placeholder="负责人" readonly></el-input>
                </el-form-item>
              </div>
            </el-col>
            <el-col :span="12">
              <div >
                <el-form-item class="input" label="联系电话" prop="lianxidianhua">
                    <el-input v-model="tbDetail.lianxidianhua" 
                      placeholder="联系电话" readonly></el-input>
                </el-form-item>
              </div>
            </el-col>
            </el-row>
                <el-row>
                  <el-col :span="24">
                    <div >
                      <el-form-item v-if="tbDetail.toubiaoneirong" label="投标内容" prop="toubiaoneirong">
                          <span v-html="tbDetail.toubiaoneirong"></span>
                      </el-form-item>
                    </div>
                  </el-col>
                </el-row>
           
          </el-form>
    
          <span slot="footer" class="dialog-footer">
            <el-button type="primary" @click="tbShow=false">返回</el-button>
          </span>
      </el-dialog>   

      <el-dialog
      title="审核"
      :visible.sync="sfshVisiable"
      width="50%">
      <el-form ref="form" :model="form" label-width="80px">
        <el-form-item label="审核状态">
          <el-select v-model="shForm.sfsh" placeholder="审核状态">
            <el-option label="通过" value="是"></el-option>
            <el-option label="不通过" value="否"></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="内容">
          <el-input type="textarea" :rows="8" v-model="shForm.shhf"></el-input>
        </el-form-item>
      </el-form>
      <span slot="footer" class="dialog-footer">
        <el-button @click="shDialog">取 消</el-button>
        <el-button type="primary" @click="shHandler">确 定</el-button>
      </span>
    </el-dialog>

    <div class="btn" style="margin-top: 20px;"> 
      <el-button  type="primary" class="btn-success" @click="onSubmit">提交</el-button>
      <el-button  class="btn-close" @click="back()">取消</el-button>
    </div>    
  </div>
</template>
<script>


export default {
  components: {
  },
  data() {
   
    return {
      addEditForm: {"btnSaveFontColor":"#fff","selectFontSize":"14px","btnCancelBorderColor":"#DCDFE6","inputBorderRadius":"4px","inputFontSize":"14px","textareaBgColor":"#fff","btnSaveFontSize":"14px","textareaBorderRadius":"4px","uploadBgColor":"#fff","textareaBorderStyle":"solid","btnCancelWidth":"88px","textareaHeight":"120px","dateBgColor":"#fff","btnSaveBorderRadius":"4px","uploadLableFontSize":"14px","textareaBorderWidth":"3px","inputLableColor":"rgba(0, 0, 0, 1)","addEditBoxColor":"rgba(255, 255, 255, 0)","dateIconFontSize":"14px","btnSaveBgColor":"rgba(64, 158, 255, 1)","uploadIconFontColor":"rgba(119, 197, 227, 1)","textareaBorderColor":"rgba(119, 197, 227, 1)","btnCancelBgColor":"rgba(64, 158, 255, 1)","selectLableColor":"rgba(0, 0, 0, 1)","btnSaveBorderStyle":"solid","dateBorderWidth":"3px","dateLableFontSize":"14px","dateBorderRadius":"4px","btnCancelBorderStyle":"solid","selectLableFontSize":"14px","selectBorderStyle":"solid","selectIconFontColor":"rgba(0, 0, 0, 1)","btnCancelHeight":"44px","inputHeight":"45px","btnCancelFontColor":"rgba(255, 255, 255, 1)","dateBorderColor":"rgba(119, 197, 227, 1)","dateIconFontColor":"rgba(0, 0, 0, 1)","uploadBorderStyle":"solid","dateBorderStyle":"solid","dateLableColor":"rgba(0, 4, 11, 1)","dateFontSize":"14px","inputBorderWidth":"3px","uploadIconFontSize":"28px","selectHeight":"40px","inputFontColor":"rgba(0, 0, 0, 1)","uploadHeight":"148px","textareaLableColor":"rgba(0, 0, 0, 1)","textareaLableFontSize":"14px","btnCancelFontSize":"14px","inputBorderStyle":"solid","btnCancelBorderRadius":"4px","inputBgColor":"#fff","inputLableFontSize":"14px","uploadLableColor":"rgba(0, 0, 0, 1)","uploadBorderRadius":"4px","btnSaveHeight":"44px","selectBgColor":"#fff","btnSaveWidth":"88px","selectIconFontSize":"14px","dateHeight":"45px","selectBorderColor":"rgba(119, 197, 227, 1)","inputBorderColor":"rgba(119, 197, 227, 1)","uploadBorderColor":"rgba(119, 197, 227, 1)","textareaFontColor":"rgba(0, 0, 0, 1)","selectBorderWidth":"3px","dateFontColor":"rgba(0, 1, 2, 1)","btnCancelBorderWidth":"0","uploadBorderWidth":"3px","textareaFontSize":"15px","selectBorderRadius":"4px","selectFontColor":"rgba(0, 0, 0, 1)","btnSaveBorderColor":"rgba(64, 158, 255, 1)","btnSaveBorderWidth":"0"},
      contents:{"searchBtnFontColor":"rgba(0, 0, 0, 1)","pagePosition":"2","inputFontSize":"14px","inputBorderRadius":"20px","tableBtnDelFontColor":"rgba(0, 0, 0, 1)","tableBtnIconPosition":"1","searchBtnHeight":"42px","tableBgColor":"rgba(255, 255, 255, 1)","inputIconColor":"rgba(0, 0, 0, 1)","searchBtnBorderRadius":"20px","tableStripe":false,"btnAdAllWarnFontColor":"rgba(0, 0, 0, 1)","tableBtnDelBgColor":"rgba(56, 182, 230, 1)","searchBtnIcon":"1","tableSize":"medium","searchBtnBorderStyle":"double","text":{"padding":"0","boxShadow":"0 0 0px rgba(0,0,0,.1)","margin":"0 auto","borderColor":"rgba(0,0,0,.3)","backgroundColor":"rgba(247, 247, 247, 0)","color":"rgba(0, 0, 0, 1)","borderRadius":"0","borderWidth":"0","width":"650px","lineHeight":"50px","fontSize":"26px","borderStyle":"solid"},"tableSelection":true,"searchBtnBorderWidth":"5px 000","tableContentFontSize":"14px","searchBtnBgColor":"#fff","inputTitleSize":"15px","btnAdAllBorderColor":"rgba(56, 182, 230, 1)","pageJumper":true,"btnAdAllIconPosition":"1","searchBoxPosition":"2","tableBtnDetailFontColor":"rgba(0, 0, 0, 1)","tableBtnHeight":"40px","pagePager":true,"searchBtnBorderColor":"rgba(56, 182, 230, 1)","tableHeaderFontColor":"rgba(0, 1, 4, 1)","inputTitle":"1","tableBtnBorderRadius":"5px","btnAdAllFont":"1","btnAdAllDelFontColor":"rgba(0, 0, 0, 1)","tableBtnIcon":"1","btnAdAllHeight":"46px","btnAdAllWarnBgColor":"rgba(255, 255, 255, 1)","btnAdAllBorderWidth":"5px 000","tableStripeFontColor":"rgba(0, 0, 0, 1)","tableBtnBorderStyle":"double","inputHeight":"42px","btnAdAllBorderRadius":"20px","btnAdAllDelBgColor":"rgba(255, 255, 255, 1)","pagePrevNext":true,"btnAdAllAddBgColor":"rgba(255, 255, 255, 1)","searchBtnFont":"1","tableIndex":true,"btnAdAllIcon":"0","tableSortable":false,"pageSizes":true,"tableFit":true,"pageBtnBG":true,"searchBtnFontSize":"15px","tableBtnEditBgColor":"rgba(56, 182, 230, 1)","box":{"padding":"10px 20px","boxShadow":"0 0 6px rgba(0,0,0,0)","flag":1,"backgroundImage":"http://codegen.caihongy.cn/20211124/229bbb98f09a41bc83995f14c422a0a1.jpg","background":"#fff"},"inputBorderWidth":"5px 000","inputFontPosition":"1","inputFontColor":"rgba(0, 0, 0, 1)","pageEachNum":10,"tableHeaderBgColor":"rgba(119, 197, 227, 1)","inputTitleColor":"rgba(0, 0, 0, 1)","btnAdAllBoxPosition":"1","tableBtnDetailBgColor":"rgba(56, 182, 230, 1)","inputIcon":"1","searchBtnIconPosition":"2","btnAdAllFontSize":"14px","inputBorderStyle":"double","tableHoverFontColor":"#333","inputBgColor":"rgba(255, 255, 255, 1)","pageStyle":false,"pageTotal":true,"btnAdAllAddFontColor":"rgba(0, 0, 0, 1)","tableBtnFont":"1","tableContentFontColor":"rgba(0, 0, 0, 1)","inputBorderColor":"rgba(56, 182, 230, 1)","tableShowHeader":true,"tableHoverBgColor":"rgba(119, 197, 227, 0.8)","tableBtnFontSize":"14px","tableBtnBorderColor":"rgba(255, 255, 255, 1)","inputIconPosition":"2","tableBorder":true,"btnAdAllBorderStyle":"double","tableBtnBorderWidth":"5px","tableStripeBgColor":"rgba(119, 197, 227, 0.8)","tableBtnEditFontColor":"rgba(0, 0, 0, 1)","tableAlign":"center"},
      id: '',
      xiangmubianhao: '',
      type: '',
      dataList: [],
      pageIndex: 1,
      pageSize: 10,
      totalPage: 0,
      dataListLoading: false,
      dataListSelections: [],
      currentRow: null,
      addOrUpdateFlag: false,
      tbDetail: '',
      tbShow: false,
      ruleForm: {
        xiangmubianhao: '',
        zbdwid: '',
        gysid: '',
        xiangmumingcheng: '',
        fengmian: '',
        zhaobiaofenlei: '',
        zhaobiaodanwei: '',
        toubiaobianhao: '',
        gongyingshangmingcheng: '',
        toubiaojiage: '',
        fabushijian: '',
        toubiaoxiangqing: '',
      },
      sfshVisiable: false,
      shForm: {},
    
    };
  },
  props: ["parent"],
  computed: {
    


  },
  created() {
    this.addEditStyleChange()
  },
  methods: {
    
    // 初始化
    init(xiangmubianhao,type) {
      if (xiangmubianhao) {
        this.xiangmubianhao = xiangmubianhao;
        this.type = type;
      } else{

      }
      console.log("xiangmubianhao",xiangmubianhao)
   
        this.getDataList() 
    },
    handleCurrentChange(val) {
        this.currentRow = val;
        console.log(123,val)
        this.$message.success('您已选择'+val.gongyingshangmingcheng)
      },
      // 获取数据列表
      getDataList() {
      this.dataListLoading = true;
      let params = {
        page: this.pageIndex,
        limit: this.pageSize,
        sort: 'id',
        xiangmubianhao: this.xiangmubianhao

      }
         
      this.$http({
        url: "zaixiantoubiao/page",
        method: "get",
        params: params
      }).then(({ data }) => {
        if (data && data.code === 0) {
          this.dataList = data.data.list;
          this.totalPage = data.data.total;
        } else {
          this.dataList = [];
          this.totalPage = 0;
        }
        this.dataListLoading = false;
      });
    },

    onSubmit(){
      console.log(1234,this.currentRow)
      if(!this.currentRow){
        return  this.$message.error("请先选择中标供应商");
      }

      if(this.currentRow.sfsh != '是'){
        this.$message({
            message: "该投标未通过审核",
            type: "success",
            duration: 1500,
            onClose: () => {
            }
          });
      }

    

      this.ruleForm =  {
        xiangmubianhao: this.currentRow.xiangmubianhao,
        zbdwid: this.currentRow.zbdwid,
        gysid: this.currentRow.gysid,
        xiangmumingcheng: this.currentRow.xiangmumingcheng,
        fengmian: this.currentRow.fengmian,
        zhaobiaofenlei: this.currentRow.zhaobiaofenlei,
        zhaobiaodanwei: this.currentRow.zhaobiaodanwei,
        toubiaobianhao: this.currentRow.toubiaobianhao,
        gongyingshangmingcheng: this.currentRow.gongyingshangmingcheng,
        toubiaojiage: this.currentRow.toubiaojiage,
        fabushijian: this.currentRow.toubiaoshijian,
        toubiaoxiangqing: this.currentRow.toubiaoneirong,
      },



      this.$confirm(`是否确认选标，操作完成之后将不能更改，并发送短信通知供应商?`, "选标提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning"
      }).then(() => {


        this.$http({
          url: `zhongbiaogonggao/save`,
          method: "post",
          data: this.ruleForm
        }).then(({ data }) => {
          if (data && data.code === 0) {
            this.$message({
              message: "选标成功",
              type: "success",
              duration: 1500,
              onClose: () => {
                this.tbShow = false;
                this.parent.xuanbiaoFlag = false;
          this.parent.showFlag = true;
          this.parent.addOrUpdateFlag = false;
          this.parent.zhongbiaogonggaoCrossAddOrUpdateFlag = false;
          this.parent.search();
        //  this.parent.contentStyleChange();
              }
            });
          } else {
            this.$message.error(data.msg);
          }
        });   

      });

      
    },

      // 返回
    back() {
      this.parent.showFlag = true;
      this.parent.addOrUpdateFlag = false;
      this.parent.xuanbiaoFlag = false;
      // this.parent.contentStyleChange();
    },

     // 审核窗口
     shDialog(row){
      this.sfshVisiable = !this.sfshVisiable;
      if(row){
        this.shForm = {
          toubiaobianhao: row.toubiaobianhao,
          xiangmubianhao: row.xiangmubianhao,
          xiangmumingcheng: row.xiangmumingcheng,
          fengmian: row.fengmian,
          zhaobiaofenlei: row.zhaobiaofenlei,
          zhaobiaodanwei: row.zhaobiaodanwei,
          toubiaowenjian: row.toubiaowenjian,
          toubiaojiage: row.toubiaojiage,
          toubiaoneirong: row.toubiaoneirong,
          toubiaoshijian: row.toubiaoshijian,
          gongyingshangmingcheng: row.gongyingshangmingcheng,
          fuzeren: row.fuzeren,
          lianxidianhua: row.lianxidianhua,
          sfsh: row.sfsh,
          shhf: row.shhf,
          id: row.id
        }
      }
    },
    // 审核
    shHandler(){
      if(!this.shForm.shhf){
        return this.$message.error("请输入审核内容！")
      }
      this.$confirm(`确定操作?`, "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning"
      }).then(() => {
        this.$http({
          url: "zaixiantoubiao/update",
          method: "post",
          data: this.shForm
        }).then(({ data }) => {
          if (data && data.code === 0) {
            this.$message({
              message: "操作成功",
              type: "success",
              duration: 1500,
              onClose: () => {
                this.getDataList();
                this.shDialog()
              }
            });
          } else {
            this.$message.error(data.msg);
          }
        });
      });
    },


       // 添加/修改
    addOrUpdateHandler(id,type) {
      this.addOrUpdateFlag = true;
      this.parent.xuanbiaoFlag = false;
      var that = this;
      console.log(123123, that.$refs.zxtbdetailRef)
      this.$nextTick(() => {
        that.$refs.zxtbdetailRef.init(id,type);
      });
    },
    showDetail(item){
      this.tbinfo(item.id)
    },
        // 多级联动参数
    tbinfo(id) {
      this.$http({
        url: `zaixiantoubiao/info/${id}`,
        method: "get"
      }).then(({ data }) => {
        if (data && data.code === 0) {
          this.tbShow = true;
        this.tbDetail = data.data;

        } else {
          this.$message.error(data.msg);
        }
      });
    },

    headerRowStyle({ row, rowIndex}){
      return {color: this.contents.tableHeaderFontColor}
    },
    headerCellStyle({ row, rowIndex}){
      return {backgroundColor: this.contents.tableHeaderBgColor}
    },
    // 每页数
    sizeChangeHandle(val) {
      this.pageSize = val;
      this.pageIndex = 1;
      this.getDataList();
    },
    // 当前页
    currentChangeHandle(val) {
      this.pageIndex = val;
      this.getDataList();
    },
    // 多选
    selectionChangeHandler(val) {
      this.dataListSelections = val;
    },
    addEditStyleChange() {
      this.$nextTick(()=>{
        // input
        document.querySelectorAll('.addEdit-block .input .el-input__inner').forEach(el=>{
          el.style.height = this.addEditForm.inputHeight
          el.style.color = this.addEditForm.inputFontColor
          el.style.fontSize = this.addEditForm.inputFontSize
          el.style.borderWidth = this.addEditForm.inputBorderWidth
          el.style.borderStyle = this.addEditForm.inputBorderStyle
          el.style.borderColor = this.addEditForm.inputBorderColor
          el.style.borderRadius = this.addEditForm.inputBorderRadius
          el.style.backgroundColor = this.addEditForm.inputBgColor
        })
        document.querySelectorAll('.addEdit-block .input .el-form-item__label').forEach(el=>{
          el.style.lineHeight = this.addEditForm.inputHeight
          el.style.color = this.addEditForm.inputLableColor
          el.style.fontSize = this.addEditForm.inputLableFontSize
        })
        // select
        document.querySelectorAll('.addEdit-block .select .el-input__inner').forEach(el=>{
          el.style.height = this.addEditForm.selectHeight
          el.style.color = this.addEditForm.selectFontColor
          el.style.fontSize = this.addEditForm.selectFontSize
          el.style.borderWidth = this.addEditForm.selectBorderWidth
          el.style.borderStyle = this.addEditForm.selectBorderStyle
          el.style.borderColor = this.addEditForm.selectBorderColor
          el.style.borderRadius = this.addEditForm.selectBorderRadius
          el.style.backgroundColor = this.addEditForm.selectBgColor
        })
        document.querySelectorAll('.addEdit-block .select .el-form-item__label').forEach(el=>{
          el.style.lineHeight = this.addEditForm.selectHeight
          el.style.color = this.addEditForm.selectLableColor
          el.style.fontSize = this.addEditForm.selectLableFontSize
        })
        document.querySelectorAll('.addEdit-block .select .el-select__caret').forEach(el=>{
          el.style.color = this.addEditForm.selectIconFontColor
          el.style.fontSize = this.addEditForm.selectIconFontSize
        })
        // date
        document.querySelectorAll('.addEdit-block .date .el-input__inner').forEach(el=>{
          el.style.height = this.addEditForm.dateHeight
          el.style.color = this.addEditForm.dateFontColor
          el.style.fontSize = this.addEditForm.dateFontSize
          el.style.borderWidth = this.addEditForm.dateBorderWidth
          el.style.borderStyle = this.addEditForm.dateBorderStyle
          el.style.borderColor = this.addEditForm.dateBorderColor
          el.style.borderRadius = this.addEditForm.dateBorderRadius
          el.style.backgroundColor = this.addEditForm.dateBgColor
        })
        document.querySelectorAll('.addEdit-block .date .el-form-item__label').forEach(el=>{
          el.style.lineHeight = this.addEditForm.dateHeight
          el.style.color = this.addEditForm.dateLableColor
          el.style.fontSize = this.addEditForm.dateLableFontSize
        })
        document.querySelectorAll('.addEdit-block .date .el-input__icon').forEach(el=>{
          el.style.color = this.addEditForm.dateIconFontColor
          el.style.fontSize = this.addEditForm.dateIconFontSize
          el.style.lineHeight = this.addEditForm.dateHeight
        })
        // upload
        let iconLineHeight = parseInt(this.addEditForm.uploadHeight) - parseInt(this.addEditForm.uploadBorderWidth) * 2 + 'px'
        document.querySelectorAll('.addEdit-block .upload .el-upload--picture-card').forEach(el=>{
          el.style.width = this.addEditForm.uploadHeight
          el.style.height = this.addEditForm.uploadHeight
          el.style.borderWidth = this.addEditForm.uploadBorderWidth
          el.style.borderStyle = this.addEditForm.uploadBorderStyle
          el.style.borderColor = this.addEditForm.uploadBorderColor
          el.style.borderRadius = this.addEditForm.uploadBorderRadius
          el.style.backgroundColor = this.addEditForm.uploadBgColor
        })
        document.querySelectorAll('.addEdit-block .upload .el-form-item__label').forEach(el=>{
          el.style.lineHeight = this.addEditForm.uploadHeight
          el.style.color = this.addEditForm.uploadLableColor
          el.style.fontSize = this.addEditForm.uploadLableFontSize
        })
        document.querySelectorAll('.addEdit-block .upload .el-icon-plus').forEach(el=>{
          el.style.color = this.addEditForm.uploadIconFontColor
          el.style.fontSize = this.addEditForm.uploadIconFontSize
          el.style.lineHeight = iconLineHeight
          el.style.display = 'block'
        })
        // 多文本输入框
        document.querySelectorAll('.addEdit-block .textarea .el-textarea__inner').forEach(el=>{
          el.style.height = this.addEditForm.textareaHeight
          el.style.color = this.addEditForm.textareaFontColor
          el.style.fontSize = this.addEditForm.textareaFontSize
          el.style.borderWidth = this.addEditForm.textareaBorderWidth
          el.style.borderStyle = this.addEditForm.textareaBorderStyle
          el.style.borderColor = this.addEditForm.textareaBorderColor
          el.style.borderRadius = this.addEditForm.textareaBorderRadius
          el.style.backgroundColor = this.addEditForm.textareaBgColor
        })
        document.querySelectorAll('.addEdit-block .textarea .el-form-item__label').forEach(el=>{
          // el.style.lineHeight = this.addEditForm.textareaHeight
          el.style.color = this.addEditForm.textareaLableColor
          el.style.fontSize = this.addEditForm.textareaLableFontSize
        })
        // 保存
        document.querySelectorAll('.addEdit-block .btn .btn-success').forEach(el=>{
          el.style.width = this.addEditForm.btnSaveWidth
          el.style.height = this.addEditForm.btnSaveHeight
          el.style.color = this.addEditForm.btnSaveFontColor
          el.style.fontSize = this.addEditForm.btnSaveFontSize
          el.style.borderWidth = this.addEditForm.btnSaveBorderWidth
          el.style.borderStyle = this.addEditForm.btnSaveBorderStyle
          el.style.borderColor = this.addEditForm.btnSaveBorderColor
          el.style.borderRadius = this.addEditForm.btnSaveBorderRadius
          el.style.backgroundColor = this.addEditForm.btnSaveBgColor
        })
        // 返回
        document.querySelectorAll('.addEdit-block .btn .btn-close').forEach(el=>{
          el.style.width = this.addEditForm.btnCancelWidth
          el.style.height = this.addEditForm.btnCancelHeight
          el.style.color = this.addEditForm.btnCancelFontColor
          el.style.fontSize = this.addEditForm.btnCancelFontSize
          el.style.borderWidth = this.addEditForm.btnCancelBorderWidth
          el.style.borderStyle = this.addEditForm.btnCancelBorderStyle
          el.style.borderColor = this.addEditForm.btnCancelBorderColor
          el.style.borderRadius = this.addEditForm.btnCancelBorderRadius
          el.style.backgroundColor = this.addEditForm.btnCancelBgColor
        })
      })
    },
  
	
  }
};
</script>
<style lang="scss">

.editor{
  height: 500px;
  
  & /deep/ .ql-container {
	  height: 310px;
  }
}
.amap-wrapper {
  width: 100%;
  height: 500px;
}
.search-box {
  position: absolute;
}
.addEdit-block {
	margin: -10px;
}
.detail-form-content {
	padding: 12px;
	background-color: transparent;
}
.btn .el-button {
  padding: 0;
}
</style>
